package com.example.base.security.service;



import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.base.excetion.GlobalExcetion;
import com.example.base.security.domain.SysRoleMenuEntity;
import com.example.base.security.domain.vo.SysRoleMenuVo;

import java.io.Serializable;
import java.util.List;

/**
 * @author Xiongx
 * @version 1.0
 * @date 2021/6/11 14:45
 * @since JDK 1.8
 */
public interface SysRoleMenuService extends IService<SysRoleMenuEntity> {

    public IPage<SysRoleMenuEntity> page(Integer pageNum, Integer pageSize, String roleId);

    /**
     * 通过角色id和菜单id获取角色菜单列表
     * @param rid 角色id
     * @param mid 菜单id
     * @return
     */
    public SysRoleMenuEntity getSysRoleMenuEntityRidMid(Serializable rid,Serializable mid);

    /**
     * 通过角色id获取角色菜单列表
     * @param rid 角色id
     * @return
     */
    public List<SysRoleMenuEntity> getSysRoleMenuEntityRid(Serializable rid);


    public List<SysRoleMenuEntity> getSysRoleMenuEntityUid(Serializable uid);

    /**
     * 添加角色菜单
     * @param vo
     */
    public void addSysRoleMenu(SysRoleMenuVo vo) throws GlobalExcetion;

}
